#include "widget.h"
#include "ui_widget.h"

#include <QPainter>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::paintEvent(QPaintEvent *event)
{
    (void) event;


    QPainter painter(this);

    QPixmap pixmap(":/1.jpg");

//    painter.drawPixmap(0,10,pixmap);

    painter.rotate(180);
    painter.translate(-800,-600);
    painter.drawPixmap(100,100,200,400,pixmap);


//    QPen pen;
//    pen.setWidth(5);
//    pen.setColor({255,0,0});
//    pen.setStyle(Qt::DashDotDotLine);

//    painter.setPen(pen);

//    QBrush brush;
//    brush.setColor(QColor(0,255,0));
//    brush.setStyle(Qt::SolidPattern);
//    brush.setStyle(Qt::Dense2Pattern);
//    painter.setBrush(brush);



//    painter.drawRect(100,100,200,300);
}

